package com.zc.auth.security.core.properties;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * jwt参数
 *
 * @author zcj
 * @version 1.0.0
 * @date 2022/7/11 15:59
 */
@Data
@ConfigurationProperties(prefix = "zc.auth.security.jwt")
public class JwtProperties {

    /**
     * 用于signature（签名）部分解密
     */
    @Value("${primary-key:zccLoginToken}")
    private String primaryKey;

    /**
     * 签发者
     */
    @Value("${iss:microservice}")
    private String iss;

    /**
     * 添加角色的key
     */
    @Value("${role-claims:roles}")
    private String roleClaims;

    /**
     * 添加用户的key
     */
    @Value("${user-claims:user}")
    private String userClaims;

    /**
     * 过期时间是3600秒，既是1个小时
     */
    @Value("${expiration:3600}")
    private Integer expiration;

    /**
     * 选择了记住我之后的过期时间为7天
     */
    @Value("${expiration-remember:604800}")
    private Integer expirationRemember;


}
